package com.xbl.test2.controller;

import com.xbl.test2.api.Test1Remote;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xbl
 * @Description
 * @date 2019/1/27
 */
@RestController
@RequestMapping("/test2")
@Api(description = "test2相关controller")
public class Test2Controller {

    @Autowired
    private Test1Remote test1Remote;

    @ApiOperation("hi")
    @RequestMapping(value = "/hi/{name}", method = RequestMethod.GET)
    public String hi(@PathVariable("name")String name){
        return test1Remote.hello(name);
    }


}
